package com.yubest.designpattern.create.singleton;

/**
 * 静态内部类
 *
 * @Author: hweiyu
 * @Date: 2022/10/26 10:56
 */
public class StaticInnerClassSingleton {

    private StaticInnerClassSingleton() {}

    public static StaticInnerClassSingleton getInstance() {
        return Inner.INSTANCE;
    }

    private static class Inner {
        private static final StaticInnerClassSingleton INSTANCE = new StaticInnerClassSingleton();
    }
}
